<template>
  <el-button type="text" @click="open">点击打开 Message Box</el-button>
</template>
<script>
import { getAllocation } from '@/api/personnel'

export default {
  data () {
    return {
      dialogVisible: false,
      id: '',
      // 专家id
      reviewExpert: '',
      // 评委id
      reviewJudges: '',
    }
  },
  watch: {
    dialogVisible (newVal) {
      this.searchForm.ref.resetFields()
    }
  },
  created () {},
  methods: {
    open (id) {
      this.id = id
      this.dialogVisible = true
      this.getDistributionList()
    },

    resetForm () {
      this.currentPage = 1
      this.searchForm.ref.resetFields()
      // 清空校验
      this.searchForm.ref.clearValidate()
      this.getDistributionList()
    },
    // 获取分配人员列表
    async getDistributionList () {
      const query = {
        personnel_id: this.id,
        ...this.searchForm.formData
      }
      this.getAllocation(query)
    },
    // 获取人才已分配专家评委列表
    async getAllocation (query) {
      const res = await getAllocation(query)
      this.tableData = res.data
      console.log(res)
    },
    handleSearchEvent () {}
  }
}
</script>
<style lang="scss" scoped>

</style>
